﻿namespace SmallBusinessKit.Models.Entities
{
    public class Person : BaseEntity
    {
        #region Properties

        public string FirstName     { get; set; }
        public string MiddleName    { get; set; }
        public string LastName      { get; set; }
        public string Title         { get; set; }
        public string Desc          { get; set; }
        public string Email         { get; set; }
        public string Phone         { get; set; }
        public string Fax           { get; set; }
        public string Address       { get; set; }
        public string City          { get; set; }
        public string State         { get; set; }
        public string ZipCode       { get; set; }
        public string Country       { get; set; }
        public string ImageUrl      { get; set; }
        public string ImageAltText  { get; set; }
        public bool   IsVisible     { get; set; }
     // public int?   DisplayOrder  { get; set; }           // defined in original but never used 

        public string DisplayName   => FirstName + " " + LastName;
        public string DisplayPhone  => $"({Phone.Substring(0, 3)}) {Phone.Substring(3, 3)}-{Phone.Substring(6)}";
        public string DisplayFax    => $"({Fax.Substring(0, 3)}) {Fax.Substring(3, 3)}-{Fax.Substring(6)}";

        #endregion
    }
}
